package util;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

/**
 * @author rpitts@gmu.edu
 */
public class SimpleConfig {

    private Properties configFile;

    /* Constructor */
    public SimpleConfig (String cFile) throws IOException {
        configFile = new Properties();
        FileInputStream in = new FileInputStream(cFile);
        configFile.load(in);
        in.close();
    }

    /* return property */
    public String getProperty (String in) {
    	String out = "";
        out = configFile.getProperty(in);
        if (out == null) return "";
        else return out;
    }
    
    /* Return an integer property */
    public int getIntProperty (String in) {
    	String stringValue = getProperty(in);
    	int intValue = (int) new Integer(stringValue);
    	return intValue;
    }
	
}